home *** CD-ROM | disk | FTP | other *** search
/ Practical Algorithms for Image Analysis / Practical Algorithms for Image Analysis.iso / TARFILE.GZ / tarfile / ch_3.5 / bcd / edge / edge_finder.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-09-11  |  1.0 KB  |  41 lines

  1. /*
  2.  * (c) Copyright 1988 by
  3.  * Robotics Principles Research Department, ATT Bell Laboratories.
  4.  * All rights reserved.
  5.  * Last modified 2/8/88 Ingemar J. Cox
  6.  * C version 8/2/88 Deborah A. Wallach
  7.  */
  8.  
  9. #define abs(x) ((x)<0 ? -(x) : (x))
  10. #define max(x, y) ((x)>(y) ? (x) : (y))
  11. #define min(x, y) ((x)<(y) ? (x) : (y))
  12.  
  13. #define EDGE_X 1
  14. #define EDGE_Y 2
  15. #define EDGE_45 3
  16. #define EDGE_135 4
  17.  
  18. #define FWD 0
  19. #define BWD 1
  20.  
  21. #define diag_scale 1.414 /* scale factor for diagonals */
  22.  
  23. struct image
  24. {
  25.     unsigned char *an_image; /* pointer to image array */
  26.     int nx, ny; /* dimensions of image array */
  27.  
  28.     int*    gaussian; /* pointer to output image after convolution */
  29.     int *idx, *idy, *id45, *id135; /* pointers to o/p from detn filters */
  30.  
  31.     int *filter; /* pointer to 1D array of filter coefficients */
  32.     int norm; /* normalization factor after convolution */
  33.     int nf, nf2; /* nf = size of filter (in pixels), nf2=nf/2 */
  34.     int orient_flag;
  35.     unsigned char *edge_map, *edge_map_hi;
  36.     int lo_threshold;
  37. };
  38.  
  39.  
  40.  
  41.